import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { SectionWrapper } from './style'

const SearchSection = memo((props) => {
  const { searchInfos } = props
  console.log(searchInfos)
  return (
    <SectionWrapper>
      {searchInfos.map((item, index)=>{
        return (
          <div className="item" key={item.title}>
            <div className="searchinfo">
              <div className="title">{item.title}</div>
              <div className="desc">{item.desc}</div>
            </div>
            {index !== searchInfos.length - 1 && <div className='divider'></div>}
          </div>)
      })}
      <div className="search"></div>
    </SectionWrapper>
  )
})

SearchSection.propTypes = {
  searchInfos:PropTypes.array
}

export default SearchSection